package com.dream.xiaobo.service;

import com.dream.xiaobo.entity.Address;

import java.sql.SQLException;
import java.util.List;

/**
 * @author xiaobo
 * @date 2021/9/2 - 8:09
 */
public interface AddressService {

    /**
     * 查看用户地址信息业务逻辑接口
     * @param uId
     * @return
     * @throws SQLException
     */
    List<Address> findAddressByUId(Integer uId) throws SQLException;

    /**
     * 插入地址信息业务逻辑接口
     * @param address
     * @throws SQLException
     */
    void insertAddress(Address address) throws SQLException;

    /**
     * 删除地址信息逻辑接口
     * @param aId
     * @throws SQLException
     */
    void deleteAddress(String aId) throws SQLException;

    /**
     * 设置默认地址逻辑接口
     * @param aId
     * @throws SQLException
     */
    void setDefault(String aId) throws SQLException;

    /**
     * 更新地址逻辑接口
     * @param address
     * @throws SQLException
     */
    void updateAddress(Address address) throws SQLException;
}
